﻿<UserControl x:Class="OSChina.Controls.TweetPortal"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
                 xmlns:tileEffect="clr-namespace:WP7_ControlsLib.Controls;assembly=WP7_ControlsLib"
    tileEffect:TiltEffect.IsTiltEnabled="True"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">
    
    <UserControl.Resources>
        <Storyboard x:Name="fadeIn">
            <DoubleAnimation Storyboard.TargetName="SecondRoot"
                             Storyboard.TargetProperty="Opacity" From="0.0"
                             To="1.0" Duration="0:0:0.32" />
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="lblContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="30">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.42" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Name="fadeOut">
            <DoubleAnimation Storyboard.TargetName="SecondRoot"
                             Storyboard.TargetProperty="Opacity" From="1.0"
                             To="0.0" Duration="0:0:0.32" />
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Width="380" Height="172" > 
        <Grid x:Name="SecondRoot">
            <Grid.RowDefinitions>
                <RowDefinition Height="43" />
                <RowDefinition Height="88" />
                <RowDefinition Height="40" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBlock Name="lblName" Grid.ColumnSpan="2" Margin="12,10,0,0" FontSize="24" />
            <Image Name="imgPortrait" VerticalAlignment="Top" Margin="12,10,10,5" Grid.Row="1" Width="50" Height="50" MouseLeftButtonUp="imgPortrait_MouseLeftButtonUp"  />
            <TextBlock Name="lblContent" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" Width="300" Height="80" >
                <TextBlock.RenderTransform>
                    <CompositeTransform/>
                </TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock Name="lblComment" FontSize="18" Margin="12,8,0,0" Grid.Row="2" Grid.ColumnSpan="2" />
        </Grid>
    </Grid>
</UserControl>
